package com.api.oa.mapper;

import com.api.oa.model.entity.YQVerify;
import com.api.oa.model.vo.OaNoticeVo;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface YQVerifyMapper {

    @Insert("insert into  yq_verify  (" +
        "verifyUser," +
        "verifyDate" +
        ") " +
        "values " +
        "(" +
        "#{entity.verifyUser}," +
        "#{entity.verifyDate}" +
    ")" )
    @Options(useGeneratedKeys = true, keyProperty = "verifyId", keyColumn = "id")
    Integer insert(@Param("entity") YQVerify entity);



    @Update("update  yq_verify  set " +
        "verifyUser = #{entity.verifyUser}," +
        "verifyDate = #{entity.verifyDate}," +
    " where verifyId = #{entity.verifyId}")
    Integer update(@Param("entity") YQVerify  entity);


    @Delete("delete from yq_verify where verifyId=#{id}")
    void delete(@Param("id") Long id);


    @Select("select * from  yq_verify  where verifyId = #{id}")
    List<YQVerify> list(@Param("id") Long pid);


    @Select("select * from  yq_verify  where verifyId = #{id} limit 1")
    YQVerify findOne(@Param("id") Long id);

}

